
package com.kugou.game.sdk.api.common;

import android.text.TextUtils;

/**
 * 描述:抽象配置类，子类有OnlineConfig和SingleConfig
 * 
 * @author Administrator
 * @since 2014-12-12 上午11:07:14
 */
public abstract class BaseSDKConfig {

    /**
     * 网游类型
     */
    public static final int GAME_TYPE_ONLINE = 0;

    /**
     * 单机类型
     */
    public static final int GAME_TYPE_SINGLE = 1;

    /********** 必填字段 *********/
    private int merchantId;

    private long appId;

    private String appKey;

    private String code;

    // 游戏的分发渠道id，如公会渠道
    private int channelId;

    private int gameId;

    /*************** 可选字段 ******************/
    private int activityOrientation = ActivityOrientation.LANDSCAPE;

    private boolean isFullScreen = true;

    private boolean needRestartWhenAccountChanged = true;

    private boolean needHidePayModule = false;

    private boolean needHideGameCenter = false;

    private boolean isPushMessage = true;

    private int gameType = GAME_TYPE_ONLINE;

    /**
     * 是否支持强制更新
     */
    private boolean isSupportForceUpdate = true;

    public int getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(int merchantId) {
        this.merchantId = merchantId;
    }

    public long getAppId() {
        return appId;
    }

    public void setAppId(long appId) {
        this.appId = appId;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        String key = "";
        if (!TextUtils.isEmpty(appKey)) {
            key = appKey.trim();
        }
        this.appKey = key;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        String temp = "";
        if (!TextUtils.isEmpty(code)) {
            temp = code.trim();
        }
        this.code = temp;
    }

    public int getChannelId() {
        return channelId;
    }

    public void setChannelId(int channelId) {
        this.channelId = channelId;
    }

    public int getGameId() {
        return gameId;
    }

    public void setGameId(int gameId) {
        this.gameId = gameId;
    }

    public int getActivityOrientation() {
        return activityOrientation;
    }

    public void setActivityOrientation(int activityOrientation) {
        this.activityOrientation = activityOrientation;
    }

    public boolean isFullScreen() {
        return isFullScreen;
    }

    public void setFullScreen(boolean isFullScreen) {
        this.isFullScreen = isFullScreen;
    }

    public boolean isNeedRestartWhenAccountChanged() {
        return needRestartWhenAccountChanged;
    }

    public void setNeedRestartWhenAccountChanged(boolean needRestartWhenAccountChanged) {
        this.needRestartWhenAccountChanged = needRestartWhenAccountChanged;
    }

    public boolean isNeedHidePayModule() {
        return needHidePayModule;
    }

    public void setNeedHidePayModule(boolean needHidePayModule) {
        this.needHidePayModule = needHidePayModule;
    }

    public boolean isNeedHideGameCenter() {
        return needHideGameCenter;
    }

    public void setNeedHideGameCenter(boolean needHideGameCenter) {
        this.needHideGameCenter = needHideGameCenter;
    }

    public boolean isPushMessage() {
        return isPushMessage;
    }

    public void setPushMessage(boolean isPushMessage) {
        this.isPushMessage = isPushMessage;
    }

    public int getGameType() {
        return gameType;
    }

    protected void setGameType(int gameType) {
        this.gameType = gameType;
    }

    public boolean isSupportForceUpdate() {
        return isSupportForceUpdate;
    }

    public void setSupportForceUpdate(boolean isSupportForceUpdate) {
        this.isSupportForceUpdate = isSupportForceUpdate;
    }
}
